package com.benlai.newretail.service.impl;

import com.benlai.newretail.config.dbconfig.TargetDataSource;
import com.benlai.newretail.dao.IPdaUserData;
import com.benlai.newretail.entity.PdaUser;
import com.benlai.newretail.service.IPdaUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author:gaoxu;
 * @Email:gaoxu@benlai.com
 * @DATE:2017-12-12
 * @version:ver1.0.0
 * @Description: Created by gaoxu on 2017-12-12.
 */

@Service
public class PdaUserServiceImpl implements IPdaUserService {

    @Autowired
    private IPdaUserData pdaUserData;

    /**
     * 根据userNo获取对象
     *
     * @param userNo
     * @return
     */
    @Override
    @TargetDataSource(name="ds3")
    public PdaUser getUserByNo(String userNo) {
        return pdaUserData.getUserByNo(userNo);
    }
}
